Generalization Error
   HOME

TheInfoList



OR:

For supervised learning applications in
machine learning Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks. It is seen as a part of artificial intelligence. Machine ...
and statistical learning theory, generalization error (also known as the out-of-sample error or the risk) is a measure of how accurately an algorithm is able to predict outcome values for previously unseen data. Because learning algorithms are evaluated on finite samples, the evaluation of a learning algorithm may be sensitive to sampling error. As a result, measurements of prediction error on the current data may not provide much information about predictive ability on new data. Generalization error can be minimized by avoiding
overfitting mathematical modeling, overfitting is "the production of an analysis that corresponds too closely or exactly to a particular set of data, and may therefore fail to fit to additional data or predict future observations reliably". An overfitt ...
in the learning algorithm. The performance of a
machine learning Machine learning (ML) is a field of inquiry devoted to understanding and building methods that 'learn', that is, methods that leverage data to improve performance on some set of tasks. It is seen as a part of artificial intelligence. Machine ...
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
is visualized by plots that show values of ''estimates'' of the generalization error through the learning process, which are called learning curves.


Definition

In a learning problem, the goal is to develop a function f_n(\vec) that predicts output values y for each input datum \vec. The subscript n indicates that the function f_n is developed based on a data set of n data points. The generalization error or expected loss or risk, I /math> of a particular function f over all possible values of \vec and y is:Mohri, M., Rostamizadeh A., Talwakar A., (2018) ''Foundations of Machine learning'', 2nd ed., Boston: MIT Press : I = \int_ V(f(\vec),y) \rho(\vec,y) d\vec dy, where V denotes a
loss function In mathematical optimization and decision theory, a loss function or cost function (sometimes also called an error function) is a function that maps an event or values of one or more variables onto a real number intuitively representing some "cos ...
and \rho(\vec,y) is the unknown joint probability distribution for \vec and y. Without knowing the joint probability distribution \rho, it is impossible to compute I /math>. Instead, we can compute the error on sample data, which is called empirical error (or empirical risk). Given n data points, the empirical error of a candidate function f is: : I_n = \frac \sum_^n V(f(\vec_i),y_i) An algorithm is said to generalize if: : \lim_ I - I_n = 0 Of particular importance is the generalization error I _n/math> of the data-dependent function f_n that is found by a learning algorithm based on the sample. Again, for an unknown probability distribution, I _n/math> cannot be computed. Instead, the aim of many problems in statistical learning theory is to bound or characterize the difference of the generalization error and the empirical error in probability: : P_G = P(I _n- I_n _n\leq \epsilon) \geq 1 - \delta_n That is, the goal is to characterize the probability 1 - \delta_n that the generalization error is less than the empirical error plus some error bound \epsilon (generally dependent on \delta and n). For many types of algorithms, it has been shown that an algorithm has generalization bounds if it meets certain stability criteria. Specifically, if an algorithm is symmetric (the order of inputs does not affect the result), has bounded loss and meets two stability conditions, it will generalize. The first stability condition,
leave-one-out cross-validation Cross-validation, sometimes called rotation estimation or out-of-sample testing, is any of various similar model validation techniques for assessing how the results of a statistical analysis will generalize to an independent data set. Cross-val ...
stability, says that to be stable, the prediction error for each data point when leave-one-out cross validation is used must converge to zero as n\rightarrow \infty. The second condition, expected-to-leave-one-out error stability (also known as hypothesis stability if operating in the L_1 norm) is met if the prediction on a left-out datapoint does not change when a single data point is removed from the training dataset. These conditions can be formalized as:


Leave-one-out cross-validation Stability

An algorithm L has CVloo stability if for each n, there exists a \beta_^ and \delta_^ such that: :\forall i\in\, \mathbb_S\\geq1-\delta_^ and \beta_^ and \delta_^ go to zero as n goes to infinity.


Expected-leave-one-out error Stability

An algorithm L has Eloo_ stability if for each n there exists a \beta_^m and a \delta_^m such that: :\forall i\in\, \mathbb_S\left\\geq1-\delta_^ with \beta_^ and \delta_^ going to zero for n\rightarrow\infty. For leave-one-out stability in the L_1 norm, this is the same as hypothesis stability: : \mathbb_


__Algorithms_with_proven_stability_

A_number_of_algorithms_have_been_proven_to_be_stable_and_as_a_result_have_bounds_on_their_generalization_error._A_list_of_these_algorithms_and_the_papers_that_proved_stability_is_available_ Stability_(learning_theory)#Algorithms_that_are_stable, here.


__Relation_to_overfitting_

_ The_concepts_of_generalization_error_and_overfitting_are_closely_related._Overfitting_occurs_when_the_learned_function_f_S_becomes_sensitive_to_the_noise_in_the_sample._As_a_result,_the_function_will_perform_well_on_the_training_set_but_not_perform_well_on_other_data_from_the_joint_probability_distribution_of_x_and_y._Thus,_the_more_overfitting_occurs,_the_larger_the_generalization_error. The_amount_of_overfitting_can_be_tested_using_ cross-validation_methods,_that_split_the_sample_into_simulated_training_samples_and_testing_samples._The_model_is_then_trained_on_a_training_sample_and_evaluated_on_the_testing_sample._The_testing_sample_is_previously_unseen_by_the_algorithm_and_so_represents_a_random_sample_from_the_joint_probability_distribution_of_x_and_y._This_test_sample_allows_us_to_approximate_the_expected_error_and_as_a_result_approximate_a_particular_form_of_the_generalization_error. Many_algorithms_exist_to_prevent_overfitting._The_minimization_algorithm_can_penalize_more_complex_functions_(known_as_Tikhonov_
regularization Regularization may refer to: * Regularization (linguistics) * Regularization (mathematics) * Regularization (physics) * Regularization (solid modeling) * Regularization Law, an Israeli law intended to retroactively legalize settlements See also ...
),_or_the_hypothesis_space_can_be_constrained,_either_explicitly_in_the_form_of_the_functions_or_by_adding_constraints_to_the_minimization_function_(Ivanov_regularization). The_approach_to_finding_a_function_that_does_not_overfit_is_at_odds_with_the_goal_of_finding_a_function_that_is_sufficiently_complex_to_capture_the_particular_characteristics_of_the_data._This_is_known_as_the_ bias–variance_tradeoff._Keeping_a_function_simple_to_avoid_overfitting_may_introduce_a_bias_in_the_resulting_predictions,_while_allowing_it_to_be_more_complex_leads_to_overfitting_and_a_higher_variance_in_the_predictions._It_is_impossible_to_minimize_both_simultaneously.


_References


_Further_reading

*_ *_ *_Mohri,_M.,_Rostamizadeh_A.,_Talwakar_A.,_(2018)_''Foundations_of_Machine_learning'',_2nd_ed.,_Boston:_MIT_Press._ *_Moody,_J.E._(1992),
The_Effective_Number_of_Parameters:_An_Analysis_of_Generalization_and_Regularization_in_Nonlinear_Learning_Systems
,_in_Moody,_J.E.,_Hanson,_S.J.,_and_Lippmann,_R.P.,_''Advances_in_Neural_Information_Processing_Systems''_4,_847-854._ *_White,_H._(1992b),_''Artificial_Neural_Networks:_Approximation_and_Learning_Theory'',_Blackwell. {{Differentiable_computing Classification_algorithmshtml" ;"title="V(f_S,z) - V(f_,z), ] \leq \beta_H^ with \beta_H^ going to zero as n goes to infinity.


Algorithms with proven stability

A number of algorithms have been proven to be stable and as a result have bounds on their generalization error. A list of these algorithms and the papers that proved stability is available Stability (learning theory)#Algorithms that are stable, here.


Relation to overfitting

The concepts of generalization error and overfitting are closely related. Overfitting occurs when the learned function f_S becomes sensitive to the noise in the sample. As a result, the function will perform well on the training set but not perform well on other data from the joint probability distribution of x and y. Thus, the more overfitting occurs, the larger the generalization error. The amount of overfitting can be tested using cross-validation methods, that split the sample into simulated training samples and testing samples. The model is then trained on a training sample and evaluated on the testing sample. The testing sample is previously unseen by the algorithm and so represents a random sample from the joint probability distribution of x and y. This test sample allows us to approximate the expected error and as a result approximate a particular form of the generalization error. Many algorithms exist to prevent overfitting. The minimization algorithm can penalize more complex functions (known as Tikhonov
regularization Regularization may refer to: * Regularization (linguistics) * Regularization (mathematics) * Regularization (physics) * Regularization (solid modeling) * Regularization Law, an Israeli law intended to retroactively legalize settlements See also ...
), or the hypothesis space can be constrained, either explicitly in the form of the functions or by adding constraints to the minimization function (Ivanov regularization). The approach to finding a function that does not overfit is at odds with the goal of finding a function that is sufficiently complex to capture the particular characteristics of the data. This is known as the bias–variance tradeoff. Keeping a function simple to avoid overfitting may introduce a bias in the resulting predictions, while allowing it to be more complex leads to overfitting and a higher variance in the predictions. It is impossible to minimize both simultaneously.


References


Further reading

* * * Mohri, M., Rostamizadeh A., Talwakar A., (2018) ''Foundations of Machine learning'', 2nd ed., Boston: MIT Press. * Moody, J.E. (1992),
The Effective Number of Parameters: An Analysis of Generalization and Regularization in Nonlinear Learning Systems
, in Moody, J.E., Hanson, S.J., and Lippmann, R.P., ''Advances in Neural Information Processing Systems'' 4, 847-854. * White, H. (1992b), ''Artificial Neural Networks: Approximation and Learning Theory'', Blackwell. {{Differentiable computing Classification algorithms>V(f_S,z) - V(f_,z), \leq \beta_H^ with \beta_H^ going to zero as n goes to infinity.


Algorithms with proven stability

A number of algorithms have been proven to be stable and as a result have bounds on their generalization error. A list of these algorithms and the papers that proved stability is available Stability (learning theory)#Algorithms that are stable, here.


Relation to overfitting

The concepts of generalization error and overfitting are closely related. Overfitting occurs when the learned function f_S becomes sensitive to the noise in the sample. As a result, the function will perform well on the training set but not perform well on other data from the joint probability distribution of x and y. Thus, the more overfitting occurs, the larger the generalization error. The amount of overfitting can be tested using cross-validation methods, that split the sample into simulated training samples and testing samples. The model is then trained on a training sample and evaluated on the testing sample. The testing sample is previously unseen by the algorithm and so represents a random sample from the joint probability distribution of x and y. This test sample allows us to approximate the expected error and as a result approximate a particular form of the generalization error. Many algorithms exist to prevent overfitting. The minimization algorithm can penalize more complex functions (known as Tikhonov
regularization Regularization may refer to: * Regularization (linguistics) * Regularization (mathematics) * Regularization (physics) * Regularization (solid modeling) * Regularization Law, an Israeli law intended to retroactively legalize settlements See also ...
), or the hypothesis space can be constrained, either explicitly in the form of the functions or by adding constraints to the minimization function (Ivanov regularization). The approach to finding a function that does not overfit is at odds with the goal of finding a function that is sufficiently complex to capture the particular characteristics of the data. This is known as the bias–variance tradeoff. Keeping a function simple to avoid overfitting may introduce a bias in the resulting predictions, while allowing it to be more complex leads to overfitting and a higher variance in the predictions. It is impossible to minimize both simultaneously.


References


Further reading

* * * Mohri, M., Rostamizadeh A., Talwakar A., (2018) ''Foundations of Machine learning'', 2nd ed., Boston: MIT Press. * Moody, J.E. (1992),
The Effective Number of Parameters: An Analysis of Generalization and Regularization in Nonlinear Learning Systems
, in Moody, J.E., Hanson, S.J., and Lippmann, R.P., ''Advances in Neural Information Processing Systems'' 4, 847-854. * White, H. (1992b), ''Artificial Neural Networks: Approximation and Learning Theory'', Blackwell. {{Differentiable computing Classification algorithms